﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DAL;
using Models;

namespace BLL
{
    public class UpLoadManager
    {
        private UpLoadService objUpLoadService = new UpLoadService();
        /// <summary>
        /// 新增（上传）文件
        /// </summary>
        /// <param name="workParentId"></param>
        /// <param name="fileAddress"></param>
        /// <returns></returns>
        public int InsertUpLoadFile(int workParentId, string fileAddress,string fileName)
        {
            return objUpLoadService.InsertUpLoadFile(workParentId, fileAddress, fileName);
        }
        /// <summary>
        /// 查询是否有相同文件名的文件
        /// </summary>
        /// <param name="fileAddress"></param>
        /// <returns></returns>
        public int GetUpLoadFile(string fileAddress)
        {
            return objUpLoadService.GetUpLoadFile(fileAddress);
        }
         /// <summary>
        /// 查询上传文件路径
        /// 需求参数 ID
        /// </summary>
        /// <param name="workParentId"></param>
        /// <returns></returns>
        public List<WorkflowUpLoad> GetUpLoadFile(int workParentId,int no)
        {
            return objUpLoadService.GetUpLoadFile(workParentId,no);
        }
    }
}
